package com.xbongbong.paas.util;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.enums.errorcodes.SystemErrorCodeEnum;

/**
 * @author 吴峰
 * @date 2022/08/23 10:46
 */
public class WorkflowValidateUtil {

    public static void checkQueryResult(Object obj) throws XbbException {
        if (obj == null) {
            throw new XbbException(SystemErrorCodeEnum.API_ERROR_100001, SystemErrorCodeEnum.API_ERROR_100001.getMsg());
        }
    }

    public static void checkQueryResult(Object obj, String msg) throws XbbException {
        if (obj == null) {
            throw new XbbException(SystemErrorCodeEnum.API_ERROR_100001, msg);
        }
    }
}
